import java.math.*;
import java.util.*;
import java.io.*;
public class ORS {
	public static float[] inputArray;
	public static void main(String args[]) {
		loadNumbersFromAFile();
		float sum = 0;
		long start = System.currentTimeMillis(); 
		for(float f: inputArray) {
			sum += f;
		}
		long end = System.currentTimeMillis();
		System.out.println("run time " + (end - start));
		System.out.println(new BigDecimal(sum));

	}	

	public static void loadNumbersFromAFile() {
		Stack inputStack = new Stack();
		try {
			Scanner sc = new Scanner(new File("numbers"));
			while(sc.hasNextFloat()) {
				float temp = sc.nextFloat();
					inputStack.push(temp);
			}
			int i = 0;
			inputArray = new float[inputStack.size()];
			while(inputStack.size() > 0) {
				inputArray[i] = ((Float) inputStack.pop()).floatValue();
				i++;
			}
		}
		catch(FileNotFoundException e) {

		}	
	}

}
